# Makefile : Makefile
# CopyRight (c) 2008 fake, Inc. All Rights Reserved.
# fake@fake.cn
# 2008-12

TARGET = terror
INSTALL_DIR=~/.bin

CXX = g++ 

SRCS = $(wildcard *.cpp)
OBJS = $(foreach src, $(SRCS), $(basename $(src)).o )

CFLAGS += -pipe -Wall -g

LDFLAGS += 

#####################################
.PHONY : all clean install

all : $(TARGET)

$(TARGET) : $(OBJS)
	$(CXX) -o $@ $^ $(LDFLAGS)

clean :
	@rm -f $(TARGET) *.o

install :
	mkdir -p $(INSTALL_DIR) && cp -f $(TARGET) $(INSTALL_DIR)

##################################
.SUFFIXES : .cpp

.cpp.o :
	$(CXX) $(CFLAGS) -c -o $@ $<

